﻿using UnityEditor;
using UnityEngine;

namespace Yoozoo.Gameplay.Liberty.Tools.Editor
{
    [CustomEditor(typeof(CollectCollidersToMeshTool))]
    public class CollectCollidersToMeshToolEditor : UnityEditor.Editor
    {
        public override void OnInspectorGUI()
        {
            CollectCollidersToMeshTool t = target as CollectCollidersToMeshTool;

            if (GUILayout.Button("开始收集"))
            {
                t.Collect();
            }

            if (GUILayout.Button("导航点检测"))
            {
                t.CheckNavPoints();
            }

            // if (GUILayout.Button("刷新NavMeshCut"))
            // {
            //     AstarPath.active.navmeshUpdates.ForceUpdate();
            // }
            
            base.OnInspectorGUI();
        }
    }
}